<div class="row">
  <nz-table #nzTable
            [nzAjaxData]="_dataSet"
            [nzShowSizeChanger]="true"
            [nzTotal]="_total"
            [(nzPageIndex)]="_current"
            (nzPageIndexChange)="refreshData()"
            [(nzPageSize)]="_pageSize"
            (nzPageSizeChange)="refreshData(true)"
            (nzDataChange)="_displayDataChange($event)"
            [nzScroll]="{ y: 500 }">
    <ng-template #nzFixedHeader>
      <thead nz-thead>
      <tr class="tableTitle">
        <th nz-th [nzCheckbox]="true" [nzWidth]="'5%'">
          <label *ngIf="allCheckbox" nz-checkbox [(ngModel)]="_allChecked" (ngModelChange)="_checkAll($event)">
          </label>
        </th>
        <th nz-th [nzWidth]="'20%'" align="center">
          <span>维护类型</span>
        </th>
        <th nz-th [nzWidth]="'20%'" align="center">
          <span>开始时间</span>
        </th>
        <th nz-th [nzWidth]="'20%'" align="center">
          <span>结束时间</span>
        </th>
        <th nz-th [nzWidth]="'10%'" align="center">
          <span>状态</span>
        </th>
        <th nz-th [nzWidth]="'25%'" align="center">
          <span>操作</span>
        </th>
      </tr>
      </thead>
    </ng-template>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable.data">
      <td nz-td [nzCheckbox]="true">
        <label *ngIf="data.status === 0" nz-checkbox [(ngModel)]="data.checked" (ngModelChange)="_refreshStatus($event,data.oid)">
        </label>
      </td>
      <td nz-td>{{data.maintainTypeObj.name}}</td>
      <td nz-td>{{data.starttime.substring(0,16)}}</td>
      <td nz-td>{{data.endtime.substring(0,16)}}</td>
      <td nz-td>{{data.statusname}}</td>
      <td nz-td>

        <a (click)="viewrecord(data.oid)">详情</a>
        <a *ngIf="data.status === 0" (click)="updaterecord(data.oid)">修改</a>
        <a *ngIf="data.status === 0" (click)="endrecord(data.oid)">结束维护</a>

      </td>
    </tr>
    </tbody>
  </nz-table>
  <div>
    <button id="btn_typedel" type="button" class="btn btn-default btn-sm" (click)="delInfo()">
      批量结束维护
    </button>
  </div>
</div>
